export const stateHandleMix = {
  methods: {
    resultHandle(h, row) {
      console.log('row', row.resultState);
      return h('span',
        {
          class: {
            pass: row.resultState == 2 || row.resultState == 4,
            warning: row.resultState == 1,
            fail: row.resultState == 0
          }
        },
        [
          h('span',
          {
            class: 'circle'
          }
          ),
          row.resultStateStr
        ]
      )
    },
    dataStateHandle(h, row) {
      return h('span', {
        class: {
          green: row.crsrmState === 'NEW',
          yellow: row.crsrmState === 'PENDING_REVIEW',
          brown: row.crsrmState === 'IS_REPORT',
          blue: row.crsrmState === 'IS_UPDATE',
          grey: row.crsrmState === 'IS_DELETE'
        }
      },
      [
        h('span',
          {
            class: 'circle',
          }
        ),
        row.crsrmStateStr
      ])
    }
  }
}
